package cn.com.code.design.application;

import cn.com.code.design.redis.RedisUtils;

import java.util.concurrent.TimeUnit;

/**
 * @author zhengpei
 * @date 2021/9/13
 */
public class CacheServiceImpl implements CacheService {

  private RedisUtils redisUtils = new RedisUtils();

  @Override
  public String get(String key) {
    return redisUtils.get(key);
  }

  @Override
  public void set(String key, String value) {
    redisUtils.set(key, value);
  }

  @Override
  public void set(String key, String value, long timoutout, TimeUnit timeUnit) {
    redisUtils.set(key, value, timoutout, timeUnit);
  }

  @Override
  public void del(String del) {
    redisUtils.del(del);
  }
}
